package com.Dao;

import com.entity.Movie;

import java.sql.SQLException;
import java.util.List;

public class MovieDao extends BaseDao{
    public List<Movie> queryMovie(){
        String sql="select * from Movie";
        try {
            return findList(Movie.class,sql);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return  null;

    }

    public Movie queryMovie(Object...params){
        String sql="select * from Movie where uName=?";
        try {
            return findBean(Movie.class,sql,params);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }

}
